package com.share.example.stock.model.db;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 目标地址: http://vip.stock.finance.sina.com.cn/mkt/#hs_s
 * 描述: 中国股票指数数据, 注意该股票指数指新浪提供的国内股票指数
 * 限量: 单次返回所有指数的实时行情数据
 * </p>
 *
 * @author author
 * @since 2023-06-17
 */
@Data
@Accessors(chain = true)
@TableName("tas_stock_day_price")
public class StockDayPrice implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 代码
     */
    private String code;
    /**
     * 日期 yyyy-mm-dd
     */
    private String date;
    /**
     * 股票中文名称
     */
    private String name;
    /**
     * 今开价
     */
    private Double open;
    /**
     * 最高价
     */
    private Double high;
    /**
     * 最低价
     */
    private Double low;
    /**
     * 收盘价 或者 当日开盘期间价
     */
    private Double close;
    /**
     * 昨天收盘价
     */
    private Double yclose;
    /**
     * 成交量-注意单位: 手
     */
    private Long volume;
    /**
     * 成交额-注意单位: 万
     */
    private Double amount;
    /**
     * 涨跌幅-百分比
     */
    @TableField(value = "price_rate")
    private Double priceRate;
    /**
     * 涨跌额
     */
    @TableField(value = "change_price")
    private Double changePrice;

    @TableField(value = "co_o")
    private Double coO;
    @TableField(value = "hl_o")
    private Double hlO;

    @TableField(value = "hl")
    private Double hl;

    @TableField(value = "co")
    private Double co;

    @TableField(value = "cl_hl")
    private Double clHl;

    @TableField(value = "ol_hl")
    private Double olHl;

    @TableField(value = "hc_hl")
    private Double hcHl;

    @TableField(value = "ho_hl")
    private Double hoHl;

    @TableField(value = "avg_oc")
    private Double avgOc;

    @TableField(value = "avg_hl")
    private Double avgHl;
}
